3.2.96 \(\int \frac {1}{(a+b \tanh ^2(c+d x))^3} \, dx\) [196]

Optimal. Leaf size=142 \[ \frac {x}{(a+b)^3}+\frac {\sqrt {b} \left (15 a^2+10 a b+3 b^2\right ) \text {ArcTan}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{8 a^{5/2} (a+b)^3 d}+\frac {b \tanh (c+d x)}{4 a (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {b (7 a+3 b) \tanh (c+d x)}{8 a^2 (a+b)^2 d \left (a+b \tanh ^2(c+d x)\right )} \]

[Out]

x/(a+b)^3+1/8*(15*a^2+10*a*b+3*b^2)*arctan(b^(1/2)*tanh(d*x+c)/a^(1/2))*b^(1/2)/a^(5/2)/(a+b)^3/d+1/4*b*tanh(d
*x+c)/a/(a+b)/d/(a+b*tanh(d*x+c)^2)^2+1/8*b*(7*a+3*b)*tanh(d*x+c)/a^2/(a+b)^2/d/(a+b*tanh(d*x+c)^2)

________________________________________________________________________________________

Rubi [A]
time = 0.11, antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3742, 425, 541, 536, 212, 211} \begin {gather*} \frac {b (7 a+3 b) \tanh (c+d x)}{8 a^2 d (a+b)^2 \left (a+b \tanh ^2(c+d x)\right )}+\frac {\sqrt {b} \left (15 a^2+10 a b+3 b^2\right ) \text {ArcTan}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{8 a^{5/2} d (a+b)^3}+\frac {b \tanh (c+d x)}{4 a d (a+b) \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {x}{(a+b)^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Tanh[c + d*x]^2)^(-3),x]

[Out]

x/(a + b)^3 + (Sqrt[b]*(15*a^2 + 10*a*b + 3*b^2)*ArcTan[(Sqrt[b]*Tanh[c + d*x])/Sqrt[a]])/(8*a^(5/2)*(a + b)^3
*d) + (b*Tanh[c + d*x])/(4*a*(a + b)*d*(a + b*Tanh[c + d*x]^2)^2) + (b*(7*a + 3*b)*Tanh[c + d*x])/(8*a^2*(a +
b)^2*d*(a + b*Tanh[c + d*x]^2))

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 425

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-b)*x*(a + b*x^n)^(p + 1)*
((c + d*x^n)^(q + 1)/(a*n*(p + 1)*(b*c - a*d))), x] + Dist[1/(a*n*(p + 1)*(b*c - a*d)), Int[(a + b*x^n)^(p + 1
)*(c + d*x^n)^q*Simp[b*c + n*(p + 1)*(b*c - a*d) + d*b*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c,
d, n, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &&  !( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomi
alQ[a, b, c, d, n, p, q, x]

Rule 536

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 541

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> Simp[(
-(b*e - a*f))*x*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*n*(b*c - a*d)*(p + 1))), x] + Dist[1/(a*n*(b*c - a
*d)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*
f)*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]

Rule 3742

Int[((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x]
, x]}, Dist[c*(ff/f), Subst[Int[(a + b*(ff*x)^n)^p/(c^2 + ff^2*x^2), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ
[{a, b, c, e, f, n, p}, x] && (IntegersQ[n, p] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rubi steps

\begin {align*} \int \frac {1}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{\left (1-x^2\right ) \left (a+b x^2\right )^3} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {b \tanh (c+d x)}{4 a (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}-\frac {\text {Subst}\left (\int \frac {b-4 (a+b)+3 b x^2}{\left (1-x^2\right ) \left (a+b x^2\right )^2} \, dx,x,\tanh (c+d x)\right )}{4 a (a+b) d}\\ &=\frac {b \tanh (c+d x)}{4 a (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {b (7 a+3 b) \tanh (c+d x)}{8 a^2 (a+b)^2 d \left (a+b \tanh ^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {8 a^2+7 a b+3 b^2-b (7 a+3 b) x^2}{\left (1-x^2\right ) \left (a+b x^2\right )} \, dx,x,\tanh (c+d x)\right )}{8 a^2 (a+b)^2 d}\\ &=\frac {b \tanh (c+d x)}{4 a (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {b (7 a+3 b) \tanh (c+d x)}{8 a^2 (a+b)^2 d \left (a+b \tanh ^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{(a+b)^3 d}+\frac {\left (b \left (15 a^2+10 a b+3 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\tanh (c+d x)\right )}{8 a^2 (a+b)^3 d}\\ &=\frac {x}{(a+b)^3}+\frac {\sqrt {b} \left (15 a^2+10 a b+3 b^2\right ) \tan ^{-1}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{8 a^{5/2} (a+b)^3 d}+\frac {b \tanh (c+d x)}{4 a (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {b (7 a+3 b) \tanh (c+d x)}{8 a^2 (a+b)^2 d \left (a+b \tanh ^2(c+d x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.24, size = 147, normalized size = 1.04 \begin {gather*} \frac {\frac {\sqrt {b} \left (15 a^2+10 a b+3 b^2\right ) \text {ArcTan}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{a^{5/2}}-4 \log (1-\tanh (c+d x))+4 \log (1+\tanh (c+d x))+\frac {2 b (a+b)^2 \tanh (c+d x)}{a \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {b (a+b) (7 a+3 b) \tanh (c+d x)}{a^2 \left (a+b \tanh ^2(c+d x)\right )}}{8 (a+b)^3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Tanh[c + d*x]^2)^(-3),x]

[Out]

((Sqrt[b]*(15*a^2 + 10*a*b + 3*b^2)*ArcTan[(Sqrt[b]*Tanh[c + d*x])/Sqrt[a]])/a^(5/2) - 4*Log[1 - Tanh[c + d*x]
] + 4*Log[1 + Tanh[c + d*x]] + (2*b*(a + b)^2*Tanh[c + d*x])/(a*(a + b*Tanh[c + d*x]^2)^2) + (b*(a + b)*(7*a +
 3*b)*Tanh[c + d*x])/(a^2*(a + b*Tanh[c + d*x]^2)))/(8*(a + b)^3*d)

________________________________________________________________________________________

Maple [A]
time = 1.27, size = 156, normalized size = 1.10

method result size
derivativedivides \(\frac {\frac {\ln \left (1+\tanh \left (d x +c \right )\right )}{2 \left (a +b \right )^{3}}+\frac {b \left (\frac {\frac {b \left (7 a^{2}+10 a b +3 b^{2}\right ) \left (\tanh ^{3}\left (d x +c \right )\right )}{8 a^{2}}+\frac {\left (9 a^{2}+14 a b +5 b^{2}\right ) \tanh \left (d x +c \right )}{8 a}}{\left (a +b \left (\tanh ^{2}\left (d x +c \right )\right )\right )^{2}}+\frac {\left (15 a^{2}+10 a b +3 b^{2}\right ) \arctan \left (\frac {b \tanh \left (d x +c \right )}{\sqrt {a b}}\right )}{8 a^{2} \sqrt {a b}}\right )}{\left (a +b \right )^{3}}-\frac {\ln \left (\tanh \left (d x +c \right )-1\right )}{2 \left (a +b \right )^{3}}}{d}\) \(156\)
default \(\frac {\frac {\ln \left (1+\tanh \left (d x +c \right )\right )}{2 \left (a +b \right )^{3}}+\frac {b \left (\frac {\frac {b \left (7 a^{2}+10 a b +3 b^{2}\right ) \left (\tanh ^{3}\left (d x +c \right )\right )}{8 a^{2}}+\frac {\left (9 a^{2}+14 a b +5 b^{2}\right ) \tanh \left (d x +c \right )}{8 a}}{\left (a +b \left (\tanh ^{2}\left (d x +c \right )\right )\right )^{2}}+\frac {\left (15 a^{2}+10 a b +3 b^{2}\right ) \arctan \left (\frac {b \tanh \left (d x +c \right )}{\sqrt {a b}}\right )}{8 a^{2} \sqrt {a b}}\right )}{\left (a +b \right )^{3}}-\frac {\ln \left (\tanh \left (d x +c \right )-1\right )}{2 \left (a +b \right )^{3}}}{d}\) \(156\)
risch \(\frac {x}{a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}}-\frac {\left (9 a^{3} {\mathrm e}^{6 d x +6 c}-a^{2} b \,{\mathrm e}^{6 d x +6 c}-13 a \,b^{2} {\mathrm e}^{6 d x +6 c}-3 b^{3} {\mathrm e}^{6 d x +6 c}+27 a^{3} {\mathrm e}^{4 d x +4 c}-9 a^{2} b \,{\mathrm e}^{4 d x +4 c}+21 a \,b^{2} {\mathrm e}^{4 d x +4 c}+9 b^{3} {\mathrm e}^{4 d x +4 c}+27 a^{3} {\mathrm e}^{2 d x +2 c}+13 a^{2} b \,{\mathrm e}^{2 d x +2 c}-23 a \,b^{2} {\mathrm e}^{2 d x +2 c}-9 b^{3} {\mathrm e}^{2 d x +2 c}+9 a^{3}+21 a^{2} b +15 a \,b^{2}+3 b^{3}\right ) b}{4 \left (a \,{\mathrm e}^{4 d x +4 c}+b \,{\mathrm e}^{4 d x +4 c}+2 a \,{\mathrm e}^{2 d x +2 c}-2 b \,{\mathrm e}^{2 d x +2 c}+a +b \right )^{2} \left (a +b \right )^{3} a^{2} d}+\frac {15 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a +2 \sqrt {-a b}-b}{a +b}\right )}{16 a \left (a +b \right )^{3} d}+\frac {5 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a +2 \sqrt {-a b}-b}{a +b}\right ) b}{8 a^{2} \left (a +b \right )^{3} d}+\frac {3 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a +2 \sqrt {-a b}-b}{a +b}\right ) b^{2}}{16 a^{3} \left (a +b \right )^{3} d}-\frac {15 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-a b}-a +b}{a +b}\right )}{16 a \left (a +b \right )^{3} d}-\frac {5 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-a b}-a +b}{a +b}\right ) b}{8 a^{2} \left (a +b \right )^{3} d}-\frac {3 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-a b}-a +b}{a +b}\right ) b^{2}}{16 a^{3} \left (a +b \right )^{3} d}\) \(592\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+b*tanh(d*x+c)^2)^3,x,method=_RETURNVERBOSE)

[Out]

1/d*(1/2/(a+b)^3*ln(1+tanh(d*x+c))+1/(a+b)^3*b*((1/8*b*(7*a^2+10*a*b+3*b^2)/a^2*tanh(d*x+c)^3+1/8*(9*a^2+14*a*
b+5*b^2)/a*tanh(d*x+c))/(a+b*tanh(d*x+c)^2)^2+1/8*(15*a^2+10*a*b+3*b^2)/a^2/(a*b)^(1/2)*arctan(b*tanh(d*x+c)/(
a*b)^(1/2)))-1/2/(a+b)^3*ln(tanh(d*x+c)-1))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 507 vs. \(2 (128) = 256\).
time = 0.60, size = 507, normalized size = 3.57 \begin {gather*} -\frac {{\left (15 \, a^{2} b + 10 \, a b^{2} + 3 \, b^{3}\right )} \arctan \left (\frac {{\left (a + b\right )} e^{\left (-2 \, d x - 2 \, c\right )} + a - b}{2 \, \sqrt {a b}}\right )}{8 \, {\left (a^{5} + 3 \, a^{4} b + 3 \, a^{3} b^{2} + a^{2} b^{3}\right )} \sqrt {a b} d} + \frac {9 \, a^{3} b + 21 \, a^{2} b^{2} + 15 \, a b^{3} + 3 \, b^{4} + {\left (27 \, a^{3} b + 13 \, a^{2} b^{2} - 23 \, a b^{3} - 9 \, b^{4}\right )} e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, {\left (9 \, a^{3} b - 3 \, a^{2} b^{2} + 7 \, a b^{3} + 3 \, b^{4}\right )} e^{\left (-4 \, d x - 4 \, c\right )} + {\left (9 \, a^{3} b - a^{2} b^{2} - 13 \, a b^{3} - 3 \, b^{4}\right )} e^{\left (-6 \, d x - 6 \, c\right )}}{4 \, {\left (a^{7} + 5 \, a^{6} b + 10 \, a^{5} b^{2} + 10 \, a^{4} b^{3} + 5 \, a^{3} b^{4} + a^{2} b^{5} + 4 \, {\left (a^{7} + 3 \, a^{6} b + 2 \, a^{5} b^{2} - 2 \, a^{4} b^{3} - 3 \, a^{3} b^{4} - a^{2} b^{5}\right )} e^{\left (-2 \, d x - 2 \, c\right )} + 2 \, {\left (3 \, a^{7} + 7 \, a^{6} b + 6 \, a^{5} b^{2} + 6 \, a^{4} b^{3} + 7 \, a^{3} b^{4} + 3 \, a^{2} b^{5}\right )} e^{\left (-4 \, d x - 4 \, c\right )} + 4 \, {\left (a^{7} + 3 \, a^{6} b + 2 \, a^{5} b^{2} - 2 \, a^{4} b^{3} - 3 \, a^{3} b^{4} - a^{2} b^{5}\right )} e^{\left (-6 \, d x - 6 \, c\right )} + {\left (a^{7} + 5 \, a^{6} b + 10 \, a^{5} b^{2} + 10 \, a^{4} b^{3} + 5 \, a^{3} b^{4} + a^{2} b^{5}\right )} e^{\left (-8 \, d x - 8 \, c\right )}\right )} d} + \frac {d x + c}{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*tanh(d*x+c)^2)^3,x, algorithm="maxima")

[Out]

-1/8*(15*a^2*b + 10*a*b^2 + 3*b^3)*arctan(1/2*((a + b)*e^(-2*d*x - 2*c) + a - b)/sqrt(a*b))/((a^5 + 3*a^4*b +
3*a^3*b^2 + a^2*b^3)*sqrt(a*b)*d) + 1/4*(9*a^3*b + 21*a^2*b^2 + 15*a*b^3 + 3*b^4 + (27*a^3*b + 13*a^2*b^2 - 23
*a*b^3 - 9*b^4)*e^(-2*d*x - 2*c) + 3*(9*a^3*b - 3*a^2*b^2 + 7*a*b^3 + 3*b^4)*e^(-4*d*x - 4*c) + (9*a^3*b - a^2
*b^2 - 13*a*b^3 - 3*b^4)*e^(-6*d*x - 6*c))/((a^7 + 5*a^6*b + 10*a^5*b^2 + 10*a^4*b^3 + 5*a^3*b^4 + a^2*b^5 + 4
*(a^7 + 3*a^6*b + 2*a^5*b^2 - 2*a^4*b^3 - 3*a^3*b^4 - a^2*b^5)*e^(-2*d*x - 2*c) + 2*(3*a^7 + 7*a^6*b + 6*a^5*b
^2 + 6*a^4*b^3 + 7*a^3*b^4 + 3*a^2*b^5)*e^(-4*d*x - 4*c) + 4*(a^7 + 3*a^6*b + 2*a^5*b^2 - 2*a^4*b^3 - 3*a^3*b^
4 - a^2*b^5)*e^(-6*d*x - 6*c) + (a^7 + 5*a^6*b + 10*a^5*b^2 + 10*a^4*b^3 + 5*a^3*b^4 + a^2*b^5)*e^(-8*d*x - 8*
c))*d) + (d*x + c)/((a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 3587 vs. \(2 (128) = 256\).
time = 0.45, size = 7496, normalized size = 52.79 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*tanh(d*x+c)^2)^3,x, algorithm="fricas")

[Out]

[1/16*(16*(a^4 + 2*a^3*b + a^2*b^2)*d*x*cosh(d*x + c)^8 + 128*(a^4 + 2*a^3*b + a^2*b^2)*d*x*cosh(d*x + c)*sinh
(d*x + c)^7 + 16*(a^4 + 2*a^3*b + a^2*b^2)*d*x*sinh(d*x + c)^8 - 4*(9*a^3*b - a^2*b^2 - 13*a*b^3 - 3*b^4 - 16*
(a^4 - a^2*b^2)*d*x)*cosh(d*x + c)^6 + 4*(112*(a^4 + 2*a^3*b + a^2*b^2)*d*x*cosh(d*x + c)^2 - 9*a^3*b + a^2*b^
2 + 13*a*b^3 + 3*b^4 + 16*(a^4 - a^2*b^2)*d*x)*sinh(d*x + c)^6 + 8*(112*(a^4 + 2*a^3*b + a^2*b^2)*d*x*cosh(d*x
 + c)^3 - 3*(9*a^3*b - a^2*b^2 - 13*a*b^3 - 3*b^4 - 16*(a^4 - a^2*b^2)*d*x)*cosh(d*x + c))*sinh(d*x + c)^5 - 4
*(27*a^3*b - 9*a^2*b^2 + 21*a*b^3 + 9*b^4 - 8*(3*a^4 - 2*a^3*b + 3*a^2*b^2)*d*x)*cosh(d*x + c)^4 + 4*(280*(a^4
 + 2*a^3*b + a^2*b^2)*d*x*cosh(d*x + c)^4 - 27*a^3*b + 9*a^2*b^2 - 21*a*b^3 - 9*b^4 + 8*(3*a^4 - 2*a^3*b + 3*a
^2*b^2)*d*x - 15*(9*a^3*b - a^2*b^2 - 13*a*b^3 - 3*b^4 - 16*(a^4 - a^2*b^2)*d*x)*cosh(d*x + c)^2)*sinh(d*x + c
)^4 - 36*a^3*b - 84*a^2*b^2 - 60*a*b^3 - 12*b^4 + 16*(56*(a^4 + 2*a^3*b + a^2*b^2)*d*x*cosh(d*x + c)^5 - 5*(9*
a^3*b - a^2*b^2 - 13*a*b^3 - 3*b^4 - 16*(a^4 - a^2*b^2)*d*x)*cosh(d*x + c)^3 - (27*a^3*b - 9*a^2*b^2 + 21*a*b^
3 + 9*b^4 - 8*(3*a^4 - 2*a^3*b + 3*a^2*b^2)*d*x)*cosh(d*x + c))*sinh(d*x + c)^3 + 16*(a^4 + 2*a^3*b + a^2*b^2)
*d*x - 4*(27*a^3*b + 13*a^2*b^2 - 23*a*b^3 - 9*b^4 - 16*(a^4 - a^2*b^2)*d*x)*cosh(d*x + c)^2 + 4*(112*(a^4 + 2
*a^3*b + a^2*b^2)*d*x*cosh(d*x + c)^6 - 15*(9*a^3*b - a^2*b^2 - 13*a*b^3 - 3*b^4 - 16*(a^4 - a^2*b^2)*d*x)*cos
h(d*x + c)^4 - 27*a^3*b - 13*a^2*b^2 + 23*a*b^3 + 9*b^4 + 16*(a^4 - a^2*b^2)*d*x - 6*(27*a^3*b - 9*a^2*b^2 + 2
1*a*b^3 + 9*b^4 - 8*(3*a^4 - 2*a^3*b + 3*a^2*b^2)*d*x)*cosh(d*x + c)^2)*sinh(d*x + c)^2 + ((15*a^4 + 40*a^3*b
+ 38*a^2*b^2 + 16*a*b^3 + 3*b^4)*cosh(d*x + c)^8 + 8*(15*a^4 + 40*a^3*b + 38*a^2*b^2 + 16*a*b^3 + 3*b^4)*cosh(
d*x + c)*sinh(d*x + c)^7 + (15*a^4 + 40*a^3*b + 38*a^2*b^2 + 16*a*b^3 + 3*b^4)*sinh(d*x + c)^8 + 4*(15*a^4 + 1
0*a^3*b - 12*a^2*b^2 - 10*a*b^3 - 3*b^4)*cosh(d*x + c)^6 + 4*(15*a^4 + 10*a^3*b - 12*a^2*b^2 - 10*a*b^3 - 3*b^
4 + 7*(15*a^4 + 40*a^3*b + 38*a^2*b^2 + 16*a*b^3 + 3*b^4)*cosh(d*x + c)^2)*sinh(d*x + c)^6 + 8*(7*(15*a^4 + 40
*a^3*b + 38*a^2*b^2 + 16*a*b^3 + 3*b^4)*cosh(d*x + c)^3 + 3*(15*a^4 + 10*a^3*b - 12*a^2*b^2 - 10*a*b^3 - 3*b^4
)*cosh(d*x + c))*sinh(d*x + c)^5 + 2*(45*a^4 + 34*a^2*b^2 + 24*a*b^3 + 9*b^4)*cosh(d*x + c)^4 + 2*(35*(15*a^4
+ 40*a^3*b + 38*a^2*b^2 + 16*a*b^3 + 3*b^4)*cosh(d*x + c)^4 + 45*a^4 + 34*a^2*b^2 + 24*a*b^3 + 9*b^4 + 30*(15*
a^4 + 10*a^3*b - 12*a^2*b^2 - 10*a*b^3 - 3*b^4)*cosh(d*x + c)^2)*sinh(d*x + c)^4 + 15*a^4 + 40*a^3*b + 38*a^2*
b^2 + 16*a*b^3 + 3*b^4 + 8*(7*(15*a^4 + 40*a^3*b + 38*a^2*b^2 + 16*a*b^3 + 3*b^4)*cosh(d*x + c)^5 + 10*(15*a^4
 + 10*a^3*b - 12*a^2*b^2 - 10*a*b^3 - 3*b^4)*cosh(d*x + c)^3 + (45*a^4 + 34*a^2*b^2 + 24*a*b^3 + 9*b^4)*cosh(d
*x + c))*sinh(d*x + c)^3 + 4*(15*a^4 + 10*a^3*b - 12*a^2*b^2 - 10*a*b^3 - 3*b^4)*cosh(d*x + c)^2 + 4*(7*(15*a^
4 + 40*a^3*b + 38*a^2*b^2 + 16*a*b^3 + 3*b^4)*cosh(d*x + c)^6 + 15*(15*a^4 + 10*a^3*b - 12*a^2*b^2 - 10*a*b^3
- 3*b^4)*cosh(d*x + c)^4 + 15*a^4 + 10*a^3*b - 12*a^2*b^2 - 10*a*b^3 - 3*b^4 + 3*(45*a^4 + 34*a^2*b^2 + 24*a*b
^3 + 9*b^4)*cosh(d*x + c)^2)*sinh(d*x + c)^2 + 8*((15*a^4 + 40*a^3*b + 38*a^2*b^2 + 16*a*b^3 + 3*b^4)*cosh(d*x
 + c)^7 + 3*(15*a^4 + 10*a^3*b - 12*a^2*b^2 - 10*a*b^3 - 3*b^4)*cosh(d*x + c)^5 + (45*a^4 + 34*a^2*b^2 + 24*a*
b^3 + 9*b^4)*cosh(d*x + c)^3 + (15*a^4 + 10*a^3*b - 12*a^2*b^2 - 10*a*b^3 - 3*b^4)*cosh(d*x + c))*sinh(d*x + c
))*sqrt(-b/a)*log(((a^2 + 2*a*b + b^2)*cosh(d*x + c)^4 + 4*(a^2 + 2*a*b + b^2)*cosh(d*x + c)*sinh(d*x + c)^3 +
 (a^2 + 2*a*b + b^2)*sinh(d*x + c)^4 + 2*(a^2 - b^2)*cosh(d*x + c)^2 + 2*(3*(a^2 + 2*a*b + b^2)*cosh(d*x + c)^
2 + a^2 - b^2)*sinh(d*x + c)^2 + a^2 - 6*a*b + b^2 + 4*((a^2 + 2*a*b + b^2)*cosh(d*x + c)^3 + (a^2 - b^2)*cosh
(d*x + c))*sinh(d*x + c) + 4*((a^2 + a*b)*cosh(d*x + c)^2 + 2*(a^2 + a*b)*cosh(d*x + c)*sinh(d*x + c) + (a^2 +
 a*b)*sinh(d*x + c)^2 + a^2 - a*b)*sqrt(-b/a))/((a + b)*cosh(d*x + c)^4 + 4*(a + b)*cosh(d*x + c)*sinh(d*x + c
)^3 + (a + b)*sinh(d*x + c)^4 + 2*(a - b)*cosh(d*x + c)^2 + 2*(3*(a + b)*cosh(d*x + c)^2 + a - b)*sinh(d*x + c
)^2 + 4*((a + b)*cosh(d*x + c)^3 + (a - b)*cosh(d*x + c))*sinh(d*x + c) + a + b)) + 8*(16*(a^4 + 2*a^3*b + a^2
*b^2)*d*x*cosh(d*x + c)^7 - 3*(9*a^3*b - a^2*b^2 - 13*a*b^3 - 3*b^4 - 16*(a^4 - a^2*b^2)*d*x)*cosh(d*x + c)^5
- 2*(27*a^3*b - 9*a^2*b^2 + 21*a*b^3 + 9*b^4 - 8*(3*a^4 - 2*a^3*b + 3*a^2*b^2)*d*x)*cosh(d*x + c)^3 - (27*a^3*
b + 13*a^2*b^2 - 23*a*b^3 - 9*b^4 - 16*(a^4 - a^2*b^2)*d*x)*cosh(d*x + c))*sinh(d*x + c))/((a^7 + 5*a^6*b + 10
*a^5*b^2 + 10*a^4*b^3 + 5*a^3*b^4 + a^2*b^5)*d*cosh(d*x + c)^8 + 8*(a^7 + 5*a^6*b + 10*a^5*b^2 + 10*a^4*b^3 +
5*a^3*b^4 + a^2*b^5)*d*cosh(d*x + c)*sinh(d*x + c)^7 + (a^7 + 5*a^6*b + 10*a^5*b^2 + 10*a^4*b^3 + 5*a^3*b^4 +
a^2*b^5)*d*sinh(d*x + c)^8 + 4*(a^7 + 3*a^6*b + 2*a^5*b^2 - 2*a^4*b^3 - 3*a^3*b^4 - a^2*b^5)*d*cosh(d*x + c)^6
 + 4*(7*(a^7 + 5*a^6*b + 10*a^5*b^2 + 10*a^4*b^3 + 5*a^3*b^4 + a^2*b^5)*d*cosh(d*x + c)^2 + (a^7 + 3*a^6*b + 2
*a^5*b^2 - 2*a^4*b^3 - 3*a^3*b^4 - a^2*b^5)*d)*...

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*tanh(d*x+c)**2)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 409 vs. \(2 (128) = 256\).
time = 0.45, size = 409, normalized size = 2.88 \begin {gather*} \frac {\frac {{\left (15 \, a^{2} b + 10 \, a b^{2} + 3 \, b^{3}\right )} \arctan \left (\frac {a e^{\left (2 \, d x + 2 \, c\right )} + b e^{\left (2 \, d x + 2 \, c\right )} + a - b}{2 \, \sqrt {a b}}\right )}{{\left (a^{5} + 3 \, a^{4} b + 3 \, a^{3} b^{2} + a^{2} b^{3}\right )} \sqrt {a b}} + \frac {8 \, {\left (d x + c\right )}}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} - \frac {2 \, {\left (9 \, a^{3} b e^{\left (6 \, d x + 6 \, c\right )} - a^{2} b^{2} e^{\left (6 \, d x + 6 \, c\right )} - 13 \, a b^{3} e^{\left (6 \, d x + 6 \, c\right )} - 3 \, b^{4} e^{\left (6 \, d x + 6 \, c\right )} + 27 \, a^{3} b e^{\left (4 \, d x + 4 \, c\right )} - 9 \, a^{2} b^{2} e^{\left (4 \, d x + 4 \, c\right )} + 21 \, a b^{3} e^{\left (4 \, d x + 4 \, c\right )} + 9 \, b^{4} e^{\left (4 \, d x + 4 \, c\right )} + 27 \, a^{3} b e^{\left (2 \, d x + 2 \, c\right )} + 13 \, a^{2} b^{2} e^{\left (2 \, d x + 2 \, c\right )} - 23 \, a b^{3} e^{\left (2 \, d x + 2 \, c\right )} - 9 \, b^{4} e^{\left (2 \, d x + 2 \, c\right )} + 9 \, a^{3} b + 21 \, a^{2} b^{2} + 15 \, a b^{3} + 3 \, b^{4}\right )}}{{\left (a^{5} + 3 \, a^{4} b + 3 \, a^{3} b^{2} + a^{2} b^{3}\right )} {\left (a e^{\left (4 \, d x + 4 \, c\right )} + b e^{\left (4 \, d x + 4 \, c\right )} + 2 \, a e^{\left (2 \, d x + 2 \, c\right )} - 2 \, b e^{\left (2 \, d x + 2 \, c\right )} + a + b\right )}^{2}}}{8 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*tanh(d*x+c)^2)^3,x, algorithm="giac")

[Out]

1/8*((15*a^2*b + 10*a*b^2 + 3*b^3)*arctan(1/2*(a*e^(2*d*x + 2*c) + b*e^(2*d*x + 2*c) + a - b)/sqrt(a*b))/((a^5
 + 3*a^4*b + 3*a^3*b^2 + a^2*b^3)*sqrt(a*b)) + 8*(d*x + c)/(a^3 + 3*a^2*b + 3*a*b^2 + b^3) - 2*(9*a^3*b*e^(6*d
*x + 6*c) - a^2*b^2*e^(6*d*x + 6*c) - 13*a*b^3*e^(6*d*x + 6*c) - 3*b^4*e^(6*d*x + 6*c) + 27*a^3*b*e^(4*d*x + 4
*c) - 9*a^2*b^2*e^(4*d*x + 4*c) + 21*a*b^3*e^(4*d*x + 4*c) + 9*b^4*e^(4*d*x + 4*c) + 27*a^3*b*e^(2*d*x + 2*c)
+ 13*a^2*b^2*e^(2*d*x + 2*c) - 23*a*b^3*e^(2*d*x + 2*c) - 9*b^4*e^(2*d*x + 2*c) + 9*a^3*b + 21*a^2*b^2 + 15*a*
b^3 + 3*b^4)/((a^5 + 3*a^4*b + 3*a^3*b^2 + a^2*b^3)*(a*e^(4*d*x + 4*c) + b*e^(4*d*x + 4*c) + 2*a*e^(2*d*x + 2*
c) - 2*b*e^(2*d*x + 2*c) + a + b)^2))/d

________________________________________________________________________________________

Mupad [B]
time = 0.90, size = 260, normalized size = 1.83 \begin {gather*} \frac {\ln \left (\mathrm {tanh}\left (c+d\,x\right )+1\right )}{2\,d\,a^3+6\,d\,a^2\,b+6\,d\,a\,b^2+2\,d\,b^3}-\frac {\ln \left (1-\mathrm {tanh}\left (c+d\,x\right )\right )}{2\,d\,a^3+6\,d\,a^2\,b+6\,d\,a\,b^2+2\,d\,b^3}+\frac {\frac {{\mathrm {tanh}\left (c+d\,x\right )}^3\,\left (\frac {3\,b^3}{8}+\frac {7\,a\,b^2}{8}\right )}{a^2\,d\,\left (a^2+2\,a\,b+b^2\right )}+\frac {\mathrm {tanh}\left (c+d\,x\right )\,\left (5\,b^2+9\,a\,b\right )}{8\,a\,d\,\left (a^2+2\,a\,b+b^2\right )}}{a^2+2\,a\,b\,{\mathrm {tanh}\left (c+d\,x\right )}^2+b^2\,{\mathrm {tanh}\left (c+d\,x\right )}^4}+\frac {\mathrm {atan}\left (\frac {b\,\mathrm {tanh}\left (c+d\,x\right )}{\sqrt {a\,b}}\right )\,\left (15\,a^2\,b+10\,a\,b^2+3\,b^3\right )}{\sqrt {a\,b}\,\left (8\,a^5\,d+a\,b\,\left (24\,a^3\,d+a\,b\,\left (24\,a\,d+8\,b\,d\right )\right )\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a + b*tanh(c + d*x)^2)^3,x)

[Out]

log(tanh(c + d*x) + 1)/(2*a^3*d + 2*b^3*d + 6*a*b^2*d + 6*a^2*b*d) - log(1 - tanh(c + d*x))/(2*a^3*d + 2*b^3*d
 + 6*a*b^2*d + 6*a^2*b*d) + ((tanh(c + d*x)^3*((7*a*b^2)/8 + (3*b^3)/8))/(a^2*d*(2*a*b + a^2 + b^2)) + (tanh(c
 + d*x)*(9*a*b + 5*b^2))/(8*a*d*(2*a*b + a^2 + b^2)))/(a^2 + b^2*tanh(c + d*x)^4 + 2*a*b*tanh(c + d*x)^2) + (a
tan((b*tanh(c + d*x))/(a*b)^(1/2))*(10*a*b^2 + 15*a^2*b + 3*b^3))/((a*b)^(1/2)*(8*a^5*d + a*b*(24*a^3*d + a*b*
(24*a*d + 8*b*d))))

________________________________________________________________________________________